Date.prototype.Format = function (fmt) {
  //author: meizz
  var o = {
    'M+': this.getMonth() + 1, //月份
    'd+': this.getDate(), //日
    'h+': this.getHours(), //小时
    'm+': this.getMinutes(), //分
    's+': this.getSeconds(), //秒
    'q+': Math.floor((this.getMonth() + 3) / 3), //季度
    S: this.getMilliseconds(), //毫秒
  };
  if (/(y+)/.test(fmt))
    fmt = fmt.replace(
      RegExp.$1,
      (this.getFullYear() + '').substr(4 - RegExp.$1.length),
    );
  for (var k in o)
    if (new RegExp('(' + k + ')').test(fmt))
      fmt = fmt.replace(
        RegExp.$1,
        RegExp.$1.length == 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length),
      );
  return fmt;
};

const get_format_date = (fmt) => {
  fmt = fmt || 'yyyy-MM-dd hh:mm:ss';
  var date = new Date();
  var o = {
    'M+': date.getMonth() + 1, //月份
    'd+': date.getDate(), //日
    'h+': date.getHours(), //小时
    'm+': date.getMinutes(), //分
    's+': date.getSeconds(), //秒
    'q+': Math.floor((date.getMonth() + 3) / 3), //季度
    S: date.getMilliseconds(), //毫秒
  };
  if (/(y+)/.test(fmt))
    fmt = fmt.replace(
      RegExp.$1,
      (date.getFullYear() + '').substr(4 - RegExp.$1.length),
    );
  for (var k in o)
    if (new RegExp('(' + k + ')').test(fmt))
      fmt = fmt.replace(
        RegExp.$1,
        RegExp.$1.length == 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length),
      );
  return fmt;
};

const PrefixZero = (num, n) => {
  return (Array(n).join(0) + num).slice(-n);
};

// console.log(get_format_date())
// var date = new Date()
// console.log((date.getFullYear() + '').substr(2));
// console.log(PrefixZero(date.getMonth(), 2))
// console.log(Math.round(new Date() / 1000).toString().substr(6))

const data_type = {
  // 字段： [宽度，是否必填，固定列，标签数, 是否搜索,数据类型]
  辖区: {
    width: 100,
    required: false,
    fixed: '',
    tags: 1,
    search: true,
    type: 'text',
    defVal: '',
  },
  姓名: {
    width: 100,
    required: true,
    fixed: '',
    tags: 1,
    search: true,
    type: 'text',
    defVal: '',
  },
  性别: {
    width: 60,
    required: false,
    fixed: '',
    tags: 1,
    search: true,
    type: 'select',
    defVal: ['未分类', '男', '女'],
  },
  身份证号: {
    width: 180,
    required: true,
    fixed: '',
    tags: 1,
    search: true,
    type: 'sfz',
    defVal: '',
  },
  电话号码: {
    width: 150,
    required: true,
    fixed: '',
    tags: 3,
    search: true,
    type: 'text',
    defVal: '',
  },
  户籍地址: {
    width: 230,
    required: false,
    fixed: '',
    tags: 1,
    search: true,
    type: 'text',
    defVal: '',
  },
  实际居住地: {
    width: 230,
    required: false,
    fixed: '',
    tags: 1,
    search: true,
    type: 'text',
    defVal: '',
  },
  职业: {
    width: 100,
    required: false,
    fixed: '',
    tags: 1,
    search: true,
    type: 'text',
    defVal: '',
  },
  健康状况: {
    width: 100,
    required: false,
    fixed: '',
    tags: 1,
    search: true,
    type: 'text',
    defVal: '',
  },
  是否到达玉林: {
    width: 120,
    required: false,
    fixed: '',
    tags: 1,
    search: true,
    type: 'text',
    defVal: '',
  },
  来玉时间: {
    width: 120,
    required: false,
    fixed: '',
    tags: 1,
    search: true,
    type: 'date',
    defVal: '',
  },
  离玉时间: {
    width: 120,
    required: false,
    fixed: '',
    tags: 1,
    search: true,
    type: 'date',
    defVal: '',
  },
  '本市人员/市外人员': {
    width: 150,
    required: false,
    fixed: '',
    tags: 1,
    search: true,
    type: 'select',
    defVal: ['本市人员', '外市人员'],
  },
  来自何地: {
    width: 200,
    required: false,
    fixed: '',
    tags: 1,
    search: true,
    type: 'text',
    defVal: '',
  },
  措施: {
    width: 250,
    required: false,
    fixed: '',
    tags: 1,
    search: true,
    type: 'textArea',
    defVal: '',
  },
  人员轨迹: {
    width: 250,
    required: false,
    fixed: '',
    tags: 1,
    search: true,
    type: 'textArea',
    defVal: '',
  },
  是否做过核酸检测: {
    width: 200,
    required: false,
    fixed: '',
    tags: 1,
    search: true,
    type: 'textArea',
    defVal: '',
  },
  是否感染过新冠肺炎病毒: {
    width: 200,
    required: false,
    fixed: '',
    tags: 1,
    search: true,
    type: 'textArea',
    defVal: '',
  },
  '最新一次核酸检测日期、结果': {
    width: 230,
    required: false,
    fixed: '',
    tags: 1,
    search: true,
    type: 'textArea',
    defVal: '',
  },
  扫码情况: {
    width: 150,
    required: false,
    fixed: '',
    tags: 1,
    search: true,
    type: 'text',
    defVal: '',
  },
  是否下发乡镇跟进: {
    width: 150,
    required: false,
    fixed: '',
    tags: 1,
    search: true,
    type: 'select',
    defVal: '',
  },
  乡镇反馈: {
    width: 250,
    required: false,
    fixed: '',
    tags: 1,
    search: true,
    type: 'textArea',
    defVal: '',
  },
  管控状态: {
    width: 150,
    required: false,
    fixed: '',
    tags: 1,
    search: true,
    type: 'select',
    defVal: ['无', '管控', '已过管控期'],
  },
  管控时间: {
    width: 150,
    required: false,
    fixed: '',
    tags: 1,
    search: true,
    type: 'text',
    defVal: '',
  },
  核查情况: {
    width: 250,
    required: false,
    fixed: '',
    tags: 5,
    search: true,
    type: 'textArea',
    defVal: '',
  },
  备注: {
    width: 250,
    required: false,
    fixed: '',
    tags: 5,
    search: true,
    type: 'textArea',
    defVal: '',
  },
  数据来源: {
    width: 250,
    required: false,
    fixed: '',
    tags: 5,
    search: true,
    type: 'text',
    defVal: '',
  },
};

// var keys = Object.keys(data_type)
// var width = 0
// keys.forEach(key => {
//     width += data_type[key].width
// });
// console.log(width)

// for (let index = 0; index < new Array(25).length; index += 3) {
//   console.log(index, index + 1, index + 2);
// }

var x = /[10][3456789]d{9}/



var x = /(\/profile\/view\/)(\S*)/

var str = "/profile/view/601a9c6c60adee42087588a2";
var patt1 = /(^\/profile\/view\/)(\S*)$/;
// console.log(str.match(patt1));


let sfz = '450981199902195808'
let ids = sfz.substring(sfz.length - 2, sfz.length - 1)
let sex = parseInt(ids) % 2 === 1 ? '男' : '女'
console.log(sex)